//
//  NSURL+stream.m
//  Test
//
//  Created by xueshan1 on 2018/11/14.
//  Copyright © 2018年 xueshan1. All rights reserved.
//

#import "NSURL+stream.h"

@implementation NSURL (stream)

- (NSURL *)streamSchemeURL{
    NSURLComponents *componnet = [NSURLComponents componentsWithURL:self resolvingAgainstBaseURL:NO];
    componnet.scheme = [componnet.scheme stringByAppendingString:@"-streaming"];
    return [componnet URL];
}

- (NSURL *)originalSchemeURL{
    NSURLComponents *component = [NSURLComponents componentsWithURL:self resolvingAgainstBaseURL:NO];
    component.scheme = [component.scheme stringByReplacingOccurrencesOfString:@"-streaming" withString:@""];
    return [component URL];
}


@end
